<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>课程认证</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
		<load href= "__JS__/jshelper.js" /> 
		<load href="__JS__/jQuery/jquery.js" />
       	<load href="__JS__/jQuery/jquery.form.js" />
       	<script type="text/JavaScript">
			function courseapprove(id,no,courseid){
				if (confirm("请您再次确认")==true) {
					//posthelper([["id",id],],'__URL__/collegedelete');
					postwith('__URL__/approve',{id:id,no:no,courseid:courseid});
				}
			}
			function courseapprove1(id,no,courseid){
				if (confirm("请您再次确认")==true) {
					//posthelper([["id",id],],'__URL__/collegedelete');
					postwith('__URL__/approve1',{id:id,no:no,courseid:courseid});
				}
			}
			function courseapprove2(id,no,courseid){
				if (confirm("请您再次确认")==true) {
					//posthelper([["id",id],],'__URL__/collegedelete');
					postwith('__URL__/approve2',{id:id,no:no,courseid:courseid});
				}
			}
			window.onload=show;
		</script>
		<load href="__JS__/jQuery/jquery.js" />
       	<load href="__JS__/jQuery/jquery.form.js" />
		<script type="text/JavaScript">
        $(function(){
            $('#form1').ajaxForm({
                //beforeSubmit:  function(){alert("before");},  // pre-submit callback
                success:       complete,  // post-submit callback
                error:function(){alert("error");},
                dataType: 'json'
            });
            
            function complete(data){
                if (data.status==1)
                {
                	window.location=window.location.href;
                }else{
                    $('#result').html(data.info).show();
                }
            }
        });
        </script>
	</head>
	<body>	
			<layout name="Auth:header" />
        	<div class="container-fluid">
     			<div class="row-fluid">
                	<layout name="Auth:leftmenu" />
                    	<div class="span8">
                          <div class="hero-unit">
                            <h1>课程认证</h1>
                            <p style="font-size:12px">当前位置：
                                <a href='__APP__/index/index' class="nowpositionhref">主页</a>>
                                <a href='__URL__/index' class="nowpositionhref">后台管理</a>>
                                <a href="__URL__/coursedetail" class="nowpositionhref">课程管理</a>>
                                <a href="" class="nowpositionhref">课程认证</a>
                             </p>
                          </div>
                          
		
				<table  class="table table-bordered table-striped" width="100%">
					<thead >
						<tr id="table_course_show_title">
							<th>课程序号</th>
							<th>课程名称</th>
							<th>已选老师</th>
							<th>是否确认</th>
							<th>操作</th>
                            <th style="display:none">ID</th>
						</tr>
					</thead>
					<load href"__PUBLIC__/js/list_show.js">
					<tbody id="tab">
						<volist name='list' id='vo' >
							<tr id="table_course_show">
								<td >{$vo.number}</td><!--课程序号-->
								<td >{$vo.cname}</td><!--课程名称-->
								<td>{$vo.name}</td><!--教师-->
								<if condition='$vo.select eq 1'>
									<td>已授权</td>
								<elseif condition="$vo.select1 eq 1" />
									<td>确认</td>
								<else/>
									<td style="color:red">未确认</td>
								</if>
								<td style="display:none;">{$vo.id}</td>	<!--课程ID-->
								<td>
                                	<if condition="$vo.select eq 1"> 
									
                                   <a href="javascript:courseapprove2('{$vo.id}','{$vo.no}','{$vo.courseid}')" class="btn btn-waring" >取消</a>
                                   <elseif condition="$vo.select1 eq 1" />
                                   <a href="javascript:courseapprove('{$vo.id}','{$vo.no}','{$vo.courseid}')" class="btn btn-primary"  title="授权教师对本门课有操作权限">授权</a>
									<a href="javascript:courseapprove2('{$vo.id}','{$vo.no}','{$vo.courseid}')" class="btn btn-waring" >取消</a>
                                    <else/>
                                    <a href="javascript:courseapprove1('{$vo.id}','{$vo.no}','{$vo.courseid}')" class="btn btn-success">确认</a>
                                    </if>
									
									<!--<input type="button" name="courseedit"onClick="courseedit({$vo.id})" value="编辑">-->
								</td>
							</tr>
						</volist>
					</tbody>		
				</table>
			
				 <p class="navbar-text pull-right">{$page}</p>
              </div>
            </div>
		</div>
        <script src="__JS__/placeholderIEshow.js"></script>
	</body>
</html>